<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="engine1/style.css" />
	<script type="text/javascript" src="engine1/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<link href="CSS/layouth.css" rel="stylesheet" type="text/css" />
</head>
<?php
       require_once("include/header.php");
        ?>
<body >
<div id="container">
  <div id="Header">
  <img src="images/img.png" alt="Hut" style="float:left;" />
  <ul class="HeaderUl" >
    <li><a href="index1.php" target="_self">&nbsp; Home&nbsp; </a></li>
    <li><a href="createStoreControler.php?action=stores" id="stores" target="_self"> &nbsp;Stores &nbsp;</a></li>
    <li><a href="#" target="_self"> &nbsp;Advertisments&nbsp; </a></li>
    <li><a href="#" target="_self">&nbsp; Link &nbsp;</a></li>
    <li style="border-right-style:none;"><a href="#" target="_self"> &nbsp;Social &nbsp;</a></li>
     <?php
   require_once("include/connection.php");
if(!isset($_SESSION))
session_start();
   if(isset($_SESSION['login']))
{
/*	echo 'welcome '.$_SESSION['user_name'].'</br>';
	echo 'you must logout';
	echo'<a href="logout.php"></a>';*/
	/*echo'<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="" target="_self">'.$_SESSION['user_name'].' &nbsp;</a></li>
    <li style="border-right-style:none;" ><a href="logout.php" target="_self">Log Out</a></li>
  </ul>
	';*/
	header("Location:index1.php");
}
else
{
	echo'<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="Registration.php" target="_self"> Sing Up &nbsp;</a></li>
    <li style="border-right-style:none;" ><a href="login.php" target="_self">Log In</a></li>
  </ul> ';
}
?>
    
  <!--<ul style="float:right;display:inline;" >
  <li ><a href="#" target="_self">Log In</a></li>
  </ul>-->
 <!-- End Header Div--> </div>
  <div id="Content" style="background-image:url(images/887075_591159557647811_5251110358447800580_o.jpg);background-repeat:repeat-y;height: auto;">
   <?php
     if (isset ($_SESSION['userLogged'])){
			header ("location:index1.php");
                     
			 }
		 else 
		 {
		 ?>
       <?php
        $ObjRegister= new RegistedUser() ;
          

       	if(isset($_POST['Send']) ){
			if(!empty($_POST['Send']))
			{
			$realName = $_FILES['sora']['name'];
		$uploadPath = "sewar/users/".$realName ;
	$tempFile=$_FILES['sora']['tmp_name'];
	move_uploaded_file($tempFile,$uploadPath) ;
	   $ObjRegister->register($_POST['UsfName'], $_POST['UslName'],$_POST['UsPass'],$_POST['UsEmail'],$uploadPath,
      $_POST['gender'],$_POST['City'],$_POST['Phone'],$_POST['Addresse'],$_POST['datee']) ;  
		   //$userObj->LogIn($_POST['UsfName'],$_POST['UslName'],$_POST['UsPass']) ;
		  // @header("location:register.php");
		   }
		}
	  /* $userObj = new users;
	   
       	if(isset($_POST['Send'])){
			$realName = $_FILES['sora']['name'];
		$uploadPath = "sewar/users/".$realName ;
		$tempFile=$_FILES['sora']['tmp_name'];
		move_uploaded_file($tempFile,$uploadPath);
	   $userObj->register($_POST['UsName'],$_POST['UsPass'],$_POST['UsEmail'],$uploadPath,$_POST['gender'],$_POST['country']);  
		   $userObj->LogIn($_POST['UsName'],$_POST['UsPass']) ;
		   @header("location:register.php");
		   }*/
	   ?>
       
  <form action="<?php echo $_SERVER['PHP_SELF']; ?> " enctype="multipart/form-data" method="post" id="msform" id="doc">
<div class="fieldset">
		<h2 class="fs-title">Create your account</h2>
		<h3 class="fs-subtitle">This is step 1</h3>
		<input type="text" class="required email" name="UsEmail" placeholder="Email" />
		<input type="password" id="pwd" class="required" minlength="5" name="UsPass" placeholder="Password" />
		<input type="password" class="required" equalTo="#pwd" placeholder="Confirm Password" />
        <input type="date" class="required" name="datee" placeholder="date" />

	</div>
<div class="fieldset">

		<h2 class="fs-title">Social Profiles</h2>
		<h3 class="fs-subtitle"> Your Contact</h3>

		<input type="text" name="facebook" placeholder="Facebook" />
        <input type="text"  class="required" name="Addresse" placeholder="Address" />
		<input class="required" name="Phone"placeholder="Telephone Number" />
        <input  type="text" class="required"  placeholder="City"name="City"/>


</div>
<div class="fieldset">

		<h2 class="fs-title">Personal Details</h2>
		<h3 class="fs-subtitle">We will never sell it</h3>
		<input type="text" class="required" name="UsfName" placeholder="First Name" />
		<input type="text" class="required" name="UslName" placeholder="Last Name" />
		<input type="file" name="sora" placeholder="Image" />
        <select class="required" name="gender">
    <option value=".." >Gander</option>
    <option value="male">male</option>
    <option value="female">female</option>
    </select>


</div>
		<input type="submit"  value="Send" name="Send" class="submit action-button" />
    </form>
            <?php
		 }
		?>
  <!-- End Contant Div--></div>
  <!--<div id="Sidebar">
  <p align="center"> Search</p>
  -->
  <!--End SideBar Div</div>-->
  <div id="clear"></div>
  
  <div id="Footer">
  <ul class="HeaderUl"  style="padding-top: 2px;">
    <li><a href="#" target="_self">&nbsp; Company&nbsp; </a></li>
    <li><a href="#" target="_self"> &nbsp;Policies &nbsp;</a></li>
    <li><a href="#" target="_self"> &nbsp;Services&nbsp; </a></li>
    <li><a href="createStoreControler.php?action=stores" id="stores" target="_self">&nbsp; Stores &nbsp;</a></li>
    <li style="border-right-style:none;"><a href="#" target="_self"> &nbsp;Contact Us &nbsp;</a></li>

  </ul>
  <!-- End Footer Div--></div>
  
 
	



<!--End Container Div--></div>
</body>
</html>
